﻿<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomAction
      Id="Ribbon.List.Items.Print"
      Location="CommandUI.Ribbon"
      RegistrationType="List"
      RegistrationId="107"
      Sequence="11"
      Title="Print">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition Location="Ribbon.ListItem.Actions.Controls._children">
          <Button
            Id="Ribbon.List.Items.Action.PrintListButton"
            Sequence="12"
            Alt="Print"
            Command="PrintList"
            Image16by16="/_layouts/images/TXT16.gif"
            Image32by32="/_layouts/images/TXT32.gif"
            LabelText="Print"
            ToolTipTitle="Print List"
            ToolTipDescription="Opens current view in a printer-friendly page."
            TemplateAlias="o1"/>
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler
          Command="PrintList"
          CommandAction="javascript:var site='{SiteUrl}';var list='{ListId}';var view=ctx.view;var ret=window.open(site + '/PrintList/PrintList.aspx?list='+ list + '&amp;view=' + view,'printwindow','scollbars=1,resizable=1,height=600,width=800');"/>
      </CommandUIHandlers>
    </CommandUIExtension>
  </CustomAction>
  <CustomAction
      Id="Ribbon.List.Items.Print"
      Location="CommandUI.Ribbon"
      RegistrationType="List"
      RegistrationId="100"
      Sequence="11"
      Title="Print">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition Location="Ribbon.ListItem.Actions.Controls._children">
          <Button
            Id="Ribbon.List.Items.Action.PrintListButton"
            Sequence="12"
            Alt="Print"
            Command="PrintList"
            Image16by16="/_layouts/images/TXT16.gif"
            Image32by32="/_layouts/images/TXT32.gif"
            LabelText="Print"
            ToolTipTitle="Print List"
            ToolTipDescription="Opens current view in a printer-friendly page."
            TemplateAlias="o1"/>
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler
          Command="PrintList"
          CommandAction="javascript:var site='{SiteUrl}';var list='{ListId}';var view=ctx.view;var ret=window.open(site + '/PrintList/PrintList.aspx?list='+ list + '&amp;view=' + view,'printwindow','scollbars=1,resizable=1,height=600,width=800');"/>
      </CommandUIHandlers>
    </CommandUIExtension>
  </CustomAction>
  <CustomAction
      Id="Ribbon.List.Items.Print"
      Location="CommandUI.Ribbon"
      RegistrationType="List"
      RegistrationId="103"
      Sequence="11"
      Title="Print">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition Location="Ribbon.ListItem.Actions.Controls._children">
          <Button
            Id="Ribbon.List.Items.Action.PrintListButton"
            Sequence="12"
            Alt="Print"
            Command="PrintList"
            Image16by16="/_layouts/images/TXT16.gif"
            Image32by32="/_layouts/images/TXT32.gif"
            LabelText="Print"
            ToolTipTitle="Print List"
            ToolTipDescription="Opens current view in a printer-friendly page."
            TemplateAlias="o1"/>
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler
          Command="PrintList"
          CommandAction="javascript:var site='{SiteUrl}';var list='{ListId}';var view=ctx.view;var ret=window.open(site + '/PrintList/PrintList.aspx?list='+ list + '&amp;view=' + view,'printwindow','scollbars=1,resizable=1,height=600,width=800');"/>
      </CommandUIHandlers>
    </CommandUIExtension>
  </CustomAction>
  <CustomAction
      Id="Ribbon.List.Items.Print"
      Location="CommandUI.Ribbon"
      RegistrationType="List"
      RegistrationId="104"
      Sequence="11"
      Title="Print">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition Location="Ribbon.ListItem.Actions.Controls._children">
          <Button
            Id="Ribbon.List.Items.Action.PrintListButton"
            Sequence="12"
            Alt="Print"
            Command="PrintList"
            Image16by16="/_layouts/images/TXT16.gif"
            Image32by32="/_layouts/images/TXT32.gif"
            LabelText="Print"
            ToolTipTitle="Print List"
            ToolTipDescription="Opens current view in a printer-friendly page."
            TemplateAlias="o1"/>
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler
          Command="PrintList"
          CommandAction="javascript:var site='{SiteUrl}';var list='{ListId}';var view=ctx.view;var ret=window.open(site + '/PrintList/PrintList.aspx?list='+ list + '&amp;view=' + view,'printwindow','scollbars=1,resizable=1,height=600,width=800');"/>
      </CommandUIHandlers>
    </CommandUIExtension>
  </CustomAction>
  <CustomAction
      Id="Ribbon.List.Items.Print"
      Location="CommandUI.Ribbon"
      RegistrationType="List"
      RegistrationId="105"
      Sequence="11"
      Title="Print">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition Location="Ribbon.ListItem.Actions.Controls._children">
          <Button
            Id="Ribbon.List.Items.Action.PrintListButton"
            Sequence="12"
            Alt="Print"
            Command="PrintList"
            Image16by16="/_layouts/images/TXT16.gif"
            Image32by32="/_layouts/images/TXT32.gif"
            LabelText="Print"
            ToolTipTitle="Print List"
            ToolTipDescription="Opens current view in a printer-friendly page."
            TemplateAlias="o1"/>
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler
          Command="PrintList"
          CommandAction="javascript:var site='{SiteUrl}';var list='{ListId}';var view=ctx.view;var ret=window.open(site + '/PrintList/PrintList.aspx?list='+ list + '&amp;view=' + view,'printwindow','scollbars=1,resizable=1,height=600,width=800');"/>
      </CommandUIHandlers>
    </CommandUIExtension>
  </CustomAction>
</Elements>
